/**
 * Implementar requide/inculde de acordo com o pattern PythonicModules
 */

/* Verifica se require existe */
if(!window.require) 
(function(){
	
	var cache = [];
	
	var extend = function(l, r){
	    //var api = reuseModule(l, r, true);
	    //if (api) return api;
	
	    var obj = l.prototype || l;
	    for (var n in r)
	        obj[n] = r[n];
	        
	    return obj;
	};
	
	var functionLoaded = function(){
		var a = "asdasdasdasd";
	};
	
	var klass = new functionLoaded;
	
	window.require = function(module,scope){
		if(scope == null)
			scope = window.require.caller ? window.require.caller.prototype : {};
		
		extend(scope, klass);
			
		return scope;
	}
})();



// alert(teste)

require.root = "http://localhost/sistemas/Javascript/JProton/yuri/module/";

function teste(){
	require("jproton.module.name");
	
	alert(a);
}
